<div class="panel panel-inverse">
    <div class="panel-heading">
        <@shiro.hasPermission name="/source/add">
        <div class="panel-heading-btn btn-group m-r-20 m-b-5">
            <a href="javascript:;" data-toggle="dropdown" class="btn btn-warning btn-sm dropdown-toggle"><i
                    class="fa fa-cogs"></i></a>
            <ul class="dropdown-menu">
                <li>
                    <a href="javascript:getData('${rc.contextPath}/source/add','${shiroUserHelper.getCurrentShiroUser().parentMenuSource.name}')"><i
                            class="fa fa-plus m-r-5"></i>新增</a></li>
            </ul>
        </div>
    </@shiro.hasPermission>
    <h4 class="panel-title">菜单列表</h4>
</div>
<div class="panel-body">
    <div class="table-responsive">
        <table class="table table-striped table-bordered">
            <thead>
            <tr>
                <th>编号</th>
                <th>名称</th>
                <th>URL</th>
                <th>级别</th>
                <th>上级</th>
                <th>排序</th>
                <th>日志</th>
                <th>状态</th>
                <th>描述</th>
                <th>操作</th>
            </tr>
            </thead>
            <#if paginationResponse?has_content && paginationResponse.content?exists>
            <#list paginationResponse.content as ct>
            <tr>
                <td>${ct.id}</td>
                <td>${ct.name}</td>
                <td>${ct.sourceCode}</td>
                <td>${ct.level}</td>
                <td>${ct.parent.name}</td>
                <td>${ct.style}</td>
                <td>
                    <#if ct.isLog == 0>
                    否
                    <#else>
                    是
                </#if>
                </td>
                <td>
                    <#if ct.status == 'A'>
                    <span class="label label-primary">有效</span>
                    <#else>
                    <span class="label label-default">无效</span>
                </#if>
                </td>
                <td>${ct.description}</td>
                <td>
                    <div class="btn-group m-r-5 m-b-5">
                        <a href="javascript:;" data-toggle="dropdown" class="btn btn-default btn-sm dropdown-toggle"><i
                                class="fa fa-bars"></i></a>
                        <ul class="dropdown-menu">
                            <@shiro.hasPermission name="/source/add">
                            <li>
                                <a href="javascript:getData('${rc.contextPath}/source/edit/${ct.id}','${shiroUserHelper.getCurrentShiroUser().parentMenuSource.name}')"><i
                                        class="fa fa-edit m-r-5"></i>修改</a></li>
                            <li class="divider"></li>
                        </@shiro.hasPermission>
                        <@shiro.hasPermission name="/source/delete">
                        <li>
                            <a href="javascript:getConfirmData('确定删除该菜单吗?','${rc.contextPath}/source/delete/${ct.id}','${shiroUserHelper.getCurrentShiroUser().parentMenuSource.name}')"><i
                                    class="fa fa-minus m-r-5"></i>删除</a></li>
                    </@shiro.hasPermission>
                    </ul>
    </div>
    </td>
    </tr>
</#list>
</#if>
</table>
</div>
</div>
</div>

<!-- 分页组件 -->
<!-- recordBean 分页查询结果Bean
     action 分页请求URL
     formName 分页需要的查询参数的表单名称 -->
<@sp.pagination recordBean=paginationResponse action="${rc.contextPath}/source/list" formName="sourceForm" area="sourceList"/>
